/*
 Navicat Premium Data Transfer

 Source Server         : dell
 Source Server Type    : MySQL
 Source Server Version : 80019
 Source Host           : localhost:3306
 Source Schema         : mall_sms

 Target Server Type    : MySQL
 Target Server Version : 80019
 File Encoding         : 65001

 Date: 16/05/2021 17:56:30
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for sms_coupon
-- ----------------------------
DROP TABLE IF EXISTS `sms_coupon`;
CREATE TABLE `sms_coupon` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `coupon_type` tinyint(1) DEFAULT NULL COMMENT '优惠卷类型[0->全场赠券；1->会员赠券；2->购物赠券；3->注册赠券]',
  `coupon_img` varchar(2000) DEFAULT NULL COMMENT '优惠券图片',
  `coupon_name` varchar(100) DEFAULT NULL COMMENT '优惠卷名字',
  `num` int DEFAULT NULL COMMENT '数量',
  `amount` decimal(18,4) DEFAULT NULL COMMENT '金额',
  `per_limit` int DEFAULT NULL COMMENT '每人限领张数',
  `min_point` decimal(18,4) DEFAULT NULL COMMENT '使用门槛',
  `start_time` datetime DEFAULT NULL COMMENT '开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '结束时间',
  `use_type` tinyint(1) DEFAULT NULL COMMENT '使用类型[0->全场通用；1->指定分类；2->指定商品]',
  `note` varchar(200) DEFAULT NULL COMMENT '备注',
  `publish_count` int DEFAULT NULL COMMENT '发行数量',
  `use_count` int DEFAULT NULL COMMENT '已使用数量',
  `receive_count` int DEFAULT NULL COMMENT '领取数量',
  `enable_start_time` datetime DEFAULT NULL COMMENT '可以领取的开始日期',
  `enable_end_time` datetime DEFAULT NULL COMMENT '可以领取的结束日期',
  `code` varchar(64) DEFAULT NULL COMMENT '优惠码',
  `member_level` tinyint(1) DEFAULT NULL COMMENT '可以领取的会员等级[0->不限等级，其他-对应等级]',
  `publish` tinyint(1) DEFAULT NULL COMMENT '发布状态[0-未发布，1-已发布]',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='优惠券信息';

-- ----------------------------
-- Records of sms_coupon
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sms_coupon_history
-- ----------------------------
DROP TABLE IF EXISTS `sms_coupon_history`;
CREATE TABLE `sms_coupon_history` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `coupon_id` bigint DEFAULT NULL COMMENT '优惠券id',
  `member_id` bigint DEFAULT NULL COMMENT '会员id',
  `member_nick_name` varchar(64) DEFAULT NULL COMMENT '会员名字',
  `get_type` tinyint(1) DEFAULT NULL COMMENT '获取方式[0->后台赠送；1->主动领取]',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `use_type` tinyint(1) DEFAULT NULL COMMENT '使用状态[0->未使用；1->已使用；2->已过期]',
  `use_time` datetime DEFAULT NULL COMMENT '使用时间',
  `order_id` bigint DEFAULT NULL COMMENT '订单id',
  `order_sn` bigint DEFAULT NULL COMMENT '订单号',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='优惠券领取历史记录';

-- ----------------------------
-- Records of sms_coupon_history
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sms_coupon_spu_category_relation
-- ----------------------------
DROP TABLE IF EXISTS `sms_coupon_spu_category_relation`;
CREATE TABLE `sms_coupon_spu_category_relation` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `coupon_id` bigint DEFAULT NULL COMMENT '优惠券id',
  `category_id` bigint DEFAULT NULL COMMENT '产品分类id',
  `category_name` varchar(64) DEFAULT NULL COMMENT '产品分类名称',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='优惠券分类关联';

-- ----------------------------
-- Records of sms_coupon_spu_category_relation
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sms_coupon_spu_relation
-- ----------------------------
DROP TABLE IF EXISTS `sms_coupon_spu_relation`;
CREATE TABLE `sms_coupon_spu_relation` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `coupon_id` bigint DEFAULT NULL COMMENT '优惠券id',
  `spu_id` bigint DEFAULT NULL COMMENT 'spu_id',
  `spu_name` varchar(255) DEFAULT NULL COMMENT 'spu_name',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='优惠券与产品关联';

-- ----------------------------
-- Records of sms_coupon_spu_relation
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sms_home_adv
-- ----------------------------
DROP TABLE IF EXISTS `sms_home_adv`;
CREATE TABLE `sms_home_adv` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `name` varchar(100) DEFAULT NULL COMMENT '名字',
  `pic` varchar(500) DEFAULT NULL COMMENT '图片地址',
  `start_time` datetime DEFAULT NULL COMMENT '开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '结束时间',
  `status` tinyint(1) DEFAULT NULL COMMENT '状态',
  `click_count` int DEFAULT NULL COMMENT '点击数',
  `url` varchar(500) DEFAULT NULL COMMENT '广告详情连接地址',
  `note` varchar(500) DEFAULT NULL COMMENT '备注',
  `sort` int DEFAULT NULL COMMENT '排序',
  `publisher_id` bigint DEFAULT NULL COMMENT '发布者',
  `auth_id` bigint DEFAULT NULL COMMENT '审核者',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='首页轮播广告';

-- ----------------------------
-- Records of sms_home_adv
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sms_home_subject
-- ----------------------------
DROP TABLE IF EXISTS `sms_home_subject`;
CREATE TABLE `sms_home_subject` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `name` varchar(200) DEFAULT NULL COMMENT '专题名字',
  `title` varchar(255) DEFAULT NULL COMMENT '专题标题',
  `sub_title` varchar(255) DEFAULT NULL COMMENT '专题副标题',
  `status` tinyint(1) DEFAULT NULL COMMENT '显示状态',
  `url` varchar(500) DEFAULT NULL COMMENT '详情连接',
  `sort` int DEFAULT NULL COMMENT '排序',
  `img` varchar(500) DEFAULT NULL COMMENT '专题图片地址',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='首页专题表【jd首页下面很多专题，每个专题链接新的页面，展示专题商品信息】';

-- ----------------------------
-- Records of sms_home_subject
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sms_home_subject_spu
-- ----------------------------
DROP TABLE IF EXISTS `sms_home_subject_spu`;
CREATE TABLE `sms_home_subject_spu` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `name` varchar(200) DEFAULT NULL COMMENT '专题名字',
  `subject_id` bigint DEFAULT NULL COMMENT '专题id',
  `spu_id` bigint DEFAULT NULL COMMENT 'spu_id',
  `sort` int DEFAULT NULL COMMENT '排序',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='专题商品';

-- ----------------------------
-- Records of sms_home_subject_spu
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sms_member_price
-- ----------------------------
DROP TABLE IF EXISTS `sms_member_price`;
CREATE TABLE `sms_member_price` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `sku_id` bigint DEFAULT NULL COMMENT 'sku_id',
  `member_level_id` bigint DEFAULT NULL COMMENT '会员等级id',
  `member_level_name` varchar(100) DEFAULT NULL COMMENT '会员等级名',
  `member_price` decimal(18,4) DEFAULT NULL COMMENT '会员对应价格',
  `add_other` tinyint(1) DEFAULT NULL COMMENT '可否叠加其他优惠[0-不可叠加优惠，1-可叠加]',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1310840959763800111 DEFAULT CHARSET=utf8 COMMENT='商品会员价格';

-- ----------------------------
-- Records of sms_member_price
-- ----------------------------
BEGIN;
INSERT INTO `sms_member_price` VALUES (1310840958593589249, 1, NULL, '金牌会员', 1.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840958610366466, 1, NULL, '银牌会员', 1.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840958614560769, 1, NULL, '铜牌会员', 1.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840958849441793, 2, NULL, '金牌会员', 2.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840958853636098, 2, NULL, '银牌会员', 2.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840958862024706, 2, NULL, '铜牌会员', 2.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959080128513, 3, NULL, '金牌会员', 2.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959092711425, 3, NULL, '银牌会员', 3.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959101100034, 3, NULL, '铜牌会员', 2.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959323398146, 4, NULL, '金牌会员', 2.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959331786754, 4, NULL, '银牌会员', 0.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959331786755, 4, NULL, '铜牌会员', 0.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959524724737, 5, NULL, '金牌会员', 2.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959537307650, 5, NULL, '银牌会员', 0.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959537307651, 5, NULL, '铜牌会员', 2.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959747022850, 6, NULL, '金牌会员', 0.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959759605761, 6, NULL, '银牌会员', 2.0000, 1);
INSERT INTO `sms_member_price` VALUES (1310840959763800065, 6, NULL, '铜牌会员', 0.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800066, 7, NULL, '金牌会员', 0.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800067, 7, NULL, '银牌会员', 0.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800068, 7, NULL, '铜牌会员', 0.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800069, 8, NULL, '金牌会员', 0.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800070, 8, NULL, '银牌会员', 0.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800071, 8, NULL, '铜牌会员', 0.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800072, 9, NULL, '金牌会员', 0.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800073, 9, NULL, '银牌会员', 0.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800074, 9, NULL, '铜牌会员', 0.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800075, 10, NULL, '金牌会员', 3.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800076, 10, NULL, '银牌会员', 0.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800077, 10, NULL, '铜牌会员', 0.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800078, 11, NULL, '金牌会员', 0.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800079, 11, NULL, '银牌会员', 0.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800080, 11, NULL, '铜牌会员', 0.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800081, 12, NULL, '金牌会员', 0.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800082, 12, NULL, '银牌会员', 0.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800083, 12, NULL, '铜牌会员', 0.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800084, 13, NULL, '金牌会员', 0.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800085, 13, NULL, '银牌会员', 0.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800086, 13, NULL, '铜牌会员', 0.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800087, 14, NULL, '金牌会员', 0.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800088, 14, NULL, '银牌会员', 0.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800089, 14, NULL, '铜牌会员', 0.0000, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800090, 15, NULL, '金牌会员', NULL, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800091, 15, NULL, '银牌会员', NULL, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800092, 15, NULL, '铜牌会员', NULL, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800093, 166, NULL, '金牌会员', NULL, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800094, 166, NULL, '银牌会员', NULL, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800095, 166, NULL, '铜牌会员', NULL, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800096, 167, NULL, '金牌会员', NULL, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800097, 167, NULL, '银牌会员', NULL, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800098, 167, NULL, '铜牌会员', NULL, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800099, 168, NULL, '金牌会员', NULL, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800100, 168, NULL, '银牌会员', NULL, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800101, 168, NULL, '铜牌会员', NULL, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800102, 169, NULL, '金牌会员', NULL, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800103, 169, NULL, '银牌会员', NULL, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800104, 169, NULL, '铜牌会员', NULL, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800105, 170, NULL, '金牌会员', NULL, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800106, 170, NULL, '银牌会员', NULL, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800107, 170, NULL, '铜牌会员', NULL, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800108, 171, NULL, '金牌会员', NULL, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800109, 171, NULL, '银牌会员', NULL, 0);
INSERT INTO `sms_member_price` VALUES (1310840959763800110, 171, NULL, '铜牌会员', NULL, 0);
COMMIT;

-- ----------------------------
-- Table structure for sms_seckill_promotion
-- ----------------------------
DROP TABLE IF EXISTS `sms_seckill_promotion`;
CREATE TABLE `sms_seckill_promotion` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `title` varchar(255) DEFAULT NULL COMMENT '活动标题',
  `start_time` datetime DEFAULT NULL COMMENT '开始日期',
  `end_time` datetime DEFAULT NULL COMMENT '结束日期',
  `status` tinyint DEFAULT NULL COMMENT '上下线状态',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `user_id` bigint DEFAULT NULL COMMENT '创建人',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='秒杀活动';

-- ----------------------------
-- Records of sms_seckill_promotion
-- ----------------------------
BEGIN;
INSERT INTO `sms_seckill_promotion` VALUES (1, '手机促销活动', '2020-11-30 10:10:26', '2020-11-30 11:10:27', 1, '2020-11-30 10:10:38', 12);
INSERT INTO `sms_seckill_promotion` VALUES (2, '电视机促销活动', '2020-12-01 07:37:14', '2020-12-01 09:37:16', 1, '2020-11-30 10:37:20', 111);
COMMIT;

-- ----------------------------
-- Table structure for sms_seckill_session
-- ----------------------------
DROP TABLE IF EXISTS `sms_seckill_session`;
CREATE TABLE `sms_seckill_session` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `name` varchar(200) DEFAULT NULL COMMENT '场次名称',
  `start_time` datetime DEFAULT NULL COMMENT '每日开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '每日结束时间',
  `status` tinyint(1) DEFAULT NULL COMMENT '启用状态',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COMMENT='秒杀活动场次';

-- ----------------------------
-- Records of sms_seckill_session
-- ----------------------------
BEGIN;
INSERT INTO `sms_seckill_session` VALUES (4, '上午场', '2020-12-07 07:36:49', '2020-12-07 13:50:57', 11, '2020-11-29 11:38:04');
INSERT INTO `sms_seckill_session` VALUES (5, '下午场', '2020-12-08 13:01:01', '2020-12-08 23:50:18', 1, '2020-11-29 04:01:13');
INSERT INTO `sms_seckill_session` VALUES (6, '今天', '2020-11-30 01:09:13', '2020-11-30 23:09:15', 1, '2020-11-30 10:09:21');
INSERT INTO `sms_seckill_session` VALUES (7, '午夜场', '2020-12-02 00:00:00', '2020-12-02 06:00:00', 1, '2020-11-30 20:38:45');
COMMIT;

-- ----------------------------
-- Table structure for sms_seckill_sku_notice
-- ----------------------------
DROP TABLE IF EXISTS `sms_seckill_sku_notice`;
CREATE TABLE `sms_seckill_sku_notice` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `member_id` bigint DEFAULT NULL COMMENT 'member_id',
  `sku_id` bigint DEFAULT NULL COMMENT 'sku_id',
  `session_id` bigint DEFAULT NULL COMMENT '活动场次id',
  `subcribe_time` datetime DEFAULT NULL COMMENT '订阅时间',
  `send_time` datetime DEFAULT NULL COMMENT '发送时间',
  `notice_type` tinyint(1) DEFAULT NULL COMMENT '通知方式[0-短信，1-邮件]',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='秒杀商品通知订阅';

-- ----------------------------
-- Records of sms_seckill_sku_notice
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sms_seckill_sku_relation
-- ----------------------------
DROP TABLE IF EXISTS `sms_seckill_sku_relation`;
CREATE TABLE `sms_seckill_sku_relation` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `promotion_id` bigint DEFAULT NULL COMMENT '活动id',
  `promotion_session_id` bigint DEFAULT NULL COMMENT '活动场次id',
  `sku_id` bigint DEFAULT NULL COMMENT '商品id',
  `seckill_price` decimal(10,0) DEFAULT NULL COMMENT '秒杀价格',
  `seckill_count` decimal(10,0) DEFAULT NULL COMMENT '秒杀总量',
  `seckill_limit` decimal(10,0) DEFAULT NULL COMMENT '每人限购数量',
  `seckill_sort` int DEFAULT NULL COMMENT '排序',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8 COMMENT='秒杀活动商品关联';

-- ----------------------------
-- Records of sms_seckill_sku_relation
-- ----------------------------
BEGIN;
INSERT INTO `sms_seckill_sku_relation` VALUES (3, 1, 6, 1, 111, 222, 12, 23);
INSERT INTO `sms_seckill_sku_relation` VALUES (6, 1, 7, 1, 9998, 100, 1, 1);
INSERT INTO `sms_seckill_sku_relation` VALUES (7, 1, 7, 2, 19999, 100, 2, 12);
INSERT INTO `sms_seckill_sku_relation` VALUES (14, 1, 4, 3, 100, 1000, 1, 23);
INSERT INTO `sms_seckill_sku_relation` VALUES (15, 1, 4, 2, 9997, 100, 10, 1);
INSERT INTO `sms_seckill_sku_relation` VALUES (16, 1, 4, 1, 8999, 19, 11, 1);
INSERT INTO `sms_seckill_sku_relation` VALUES (17, 1, 5, 2, 1999, 10000, 120, 3);
INSERT INTO `sms_seckill_sku_relation` VALUES (26, 1, 5, 1, 10000, 10, 10, 12);
COMMIT;

-- ----------------------------
-- Table structure for sms_sku_full_reduction
-- ----------------------------
DROP TABLE IF EXISTS `sms_sku_full_reduction`;
CREATE TABLE `sms_sku_full_reduction` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `sku_id` bigint DEFAULT NULL COMMENT 'spu_id',
  `full_price` decimal(18,4) DEFAULT NULL COMMENT '满多少',
  `reduce_price` decimal(18,4) DEFAULT NULL COMMENT '减多少',
  `add_other` tinyint(1) DEFAULT NULL COMMENT '是否参与其他优惠',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1310840959646359585 DEFAULT CHARSET=utf8 COMMENT='商品满减信息';

-- ----------------------------
-- Records of sms_sku_full_reduction
-- ----------------------------
BEGIN;
INSERT INTO `sms_sku_full_reduction` VALUES (1310840958308376578, 1, 2.0000, 2.0000, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840958740389889, 2, 2.0000, 2.0000, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840958979465218, 3, 2.0000, 2.0000, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959226929153, 4, 2.0000, 3.0000, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959440838658, 5, 2.0000, 2.0000, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359553, 6, 2.0000, 1.0000, 1);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359554, 7, 3.0000, 2.0000, 1);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359555, 8, 0.0000, 0.0000, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359556, 9, 0.0000, 2.0000, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359557, 10, 0.0000, 2.0000, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359558, 11, 0.0000, 0.0000, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359559, 12, 0.0000, 0.0000, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359560, 13, 0.0000, 0.0000, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359561, 14, 0.0000, 0.0000, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359562, 15, NULL, NULL, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359563, 166, NULL, NULL, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359564, 167, NULL, NULL, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359565, 168, NULL, NULL, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359566, 169, NULL, NULL, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359567, 170, NULL, NULL, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359568, 171, NULL, NULL, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359569, 172, NULL, NULL, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359570, 173, NULL, NULL, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359571, 174, NULL, NULL, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359572, 175, NULL, NULL, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359573, 176, NULL, NULL, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359574, 177, NULL, NULL, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359575, 178, NULL, NULL, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359576, 179, NULL, NULL, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359577, 180, 0.0000, 0.0000, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359578, 181, NULL, NULL, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359579, 182, NULL, NULL, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359580, 183, NULL, NULL, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359581, 184, NULL, NULL, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359582, 185, NULL, NULL, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359583, 186, NULL, NULL, NULL);
INSERT INTO `sms_sku_full_reduction` VALUES (1310840959646359584, 187, NULL, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for sms_sku_ladder
-- ----------------------------
DROP TABLE IF EXISTS `sms_sku_ladder`;
CREATE TABLE `sms_sku_ladder` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `sku_id` bigint DEFAULT NULL COMMENT 'spu_id',
  `full_count` int DEFAULT NULL COMMENT '满几件',
  `discount` decimal(4,2) DEFAULT NULL COMMENT '打几折',
  `price` decimal(18,4) DEFAULT NULL COMMENT '折后价',
  `add_other` tinyint(1) DEFAULT NULL COMMENT '是否叠加其他优惠[0-不可叠加，1-可叠加]',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1310840959692496924 DEFAULT CHARSET=utf8 COMMENT='商品阶梯价格';

-- ----------------------------
-- Records of sms_sku_ladder
-- ----------------------------
BEGIN;
INSERT INTO `sms_sku_ladder` VALUES (1310840958409039873, 1, 4, 3.00, NULL, NULL);
INSERT INTO `sms_sku_ladder` VALUES (1310840958790721538, 2, 2, 0.00, NULL, NULL);
INSERT INTO `sms_sku_ladder` VALUES (1310840959029796865, 3, 2, 2.00, NULL, 1);
INSERT INTO `sms_sku_ladder` VALUES (1310840959273066498, 4, 2, 2.00, NULL, NULL);
INSERT INTO `sms_sku_ladder` VALUES (1310840959486976002, 5, 2, 2.00, NULL, NULL);
INSERT INTO `sms_sku_ladder` VALUES (1310840959692496898, 6, 2, 0.00, NULL, 1);
INSERT INTO `sms_sku_ladder` VALUES (1310840959692496899, 7, 2, 1.00, NULL, NULL);
INSERT INTO `sms_sku_ladder` VALUES (1310840959692496900, 8, 0, 0.00, NULL, NULL);
INSERT INTO `sms_sku_ladder` VALUES (1310840959692496901, 9, 0, 2.00, NULL, NULL);
INSERT INTO `sms_sku_ladder` VALUES (1310840959692496902, 10, 0, 2.00, NULL, NULL);
INSERT INTO `sms_sku_ladder` VALUES (1310840959692496903, 11, 0, 0.00, NULL, NULL);
INSERT INTO `sms_sku_ladder` VALUES (1310840959692496904, 12, 0, 0.00, NULL, NULL);
INSERT INTO `sms_sku_ladder` VALUES (1310840959692496905, 13, 0, 0.00, NULL, NULL);
INSERT INTO `sms_sku_ladder` VALUES (1310840959692496906, 14, 0, 0.00, NULL, NULL);
INSERT INTO `sms_sku_ladder` VALUES (1310840959692496907, 15, NULL, NULL, NULL, NULL);
INSERT INTO `sms_sku_ladder` VALUES (1310840959692496908, 172, NULL, NULL, NULL, NULL);
INSERT INTO `sms_sku_ladder` VALUES (1310840959692496909, 173, NULL, NULL, NULL, NULL);
INSERT INTO `sms_sku_ladder` VALUES (1310840959692496910, 174, NULL, NULL, NULL, NULL);
INSERT INTO `sms_sku_ladder` VALUES (1310840959692496911, 175, NULL, NULL, NULL, NULL);
INSERT INTO `sms_sku_ladder` VALUES (1310840959692496912, 176, NULL, NULL, NULL, NULL);
INSERT INTO `sms_sku_ladder` VALUES (1310840959692496913, 177, NULL, NULL, NULL, NULL);
INSERT INTO `sms_sku_ladder` VALUES (1310840959692496914, 178, NULL, NULL, NULL, NULL);
INSERT INTO `sms_sku_ladder` VALUES (1310840959692496915, 179, NULL, NULL, NULL, NULL);
INSERT INTO `sms_sku_ladder` VALUES (1310840959692496916, 180, 0, 0.00, NULL, NULL);
INSERT INTO `sms_sku_ladder` VALUES (1310840959692496917, 181, NULL, NULL, NULL, NULL);
INSERT INTO `sms_sku_ladder` VALUES (1310840959692496918, 182, NULL, NULL, NULL, NULL);
INSERT INTO `sms_sku_ladder` VALUES (1310840959692496919, 183, NULL, NULL, NULL, NULL);
INSERT INTO `sms_sku_ladder` VALUES (1310840959692496920, 184, NULL, NULL, NULL, NULL);
INSERT INTO `sms_sku_ladder` VALUES (1310840959692496921, 185, NULL, NULL, NULL, NULL);
INSERT INTO `sms_sku_ladder` VALUES (1310840959692496922, 186, NULL, NULL, NULL, NULL);
INSERT INTO `sms_sku_ladder` VALUES (1310840959692496923, 187, NULL, NULL, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for sms_spu_bounds
-- ----------------------------
DROP TABLE IF EXISTS `sms_spu_bounds`;
CREATE TABLE `sms_spu_bounds` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `spu_id` bigint DEFAULT NULL,
  `grow_bounds` decimal(18,4) DEFAULT NULL COMMENT '成长积分',
  `buy_bounds` decimal(18,4) DEFAULT NULL COMMENT '购物积分',
  `work` tinyint(1) DEFAULT NULL COMMENT '优惠生效情况[1111（四个状态位，从右到左）;0 - 无优惠，成长积分是否赠送;1 - 无优惠，购物积分是否赠送;2 - 有优惠，成长积分是否赠送;3 - 有优惠，购物积分是否赠送【状态位0：不赠送，1：赠送】]',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='商品spu积分设置';

-- ----------------------------
-- Records of sms_spu_bounds
-- ----------------------------
BEGIN;
INSERT INTO `sms_spu_bounds` VALUES (1, 1, 20000.0000, 1000.0000, NULL);
INSERT INTO `sms_spu_bounds` VALUES (2, 2, 4.0000, 5.0000, NULL);
INSERT INTO `sms_spu_bounds` VALUES (3, 3, NULL, NULL, NULL);
INSERT INTO `sms_spu_bounds` VALUES (4, 4, 23.0000, 12.0000, NULL);
INSERT INTO `sms_spu_bounds` VALUES (5, 5, 23.0000, 12.0000, NULL);
COMMIT;

-- ----------------------------
-- Table structure for undo_log
-- ----------------------------
DROP TABLE IF EXISTS `undo_log`;
CREATE TABLE `undo_log` (
  `branch_id` bigint NOT NULL COMMENT 'branch transaction id',
  `xid` varchar(100) NOT NULL COMMENT 'global transaction id',
  `context` varchar(128) NOT NULL COMMENT 'undo_log context,such as serialization',
  `rollback_info` longblob NOT NULL COMMENT 'rollback info',
  `log_status` int NOT NULL COMMENT '0:normal status,1:defense status',
  `log_created` datetime(6) NOT NULL COMMENT 'create datetime',
  `log_modified` datetime(6) NOT NULL COMMENT 'modify datetime',
  UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='AT transaction mode undo table';

-- ----------------------------
-- Records of undo_log
-- ----------------------------
BEGIN;
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
